<template>
    <div class="maxbody">
        <header class="backimg">
            <!-- 在这里引入红桥图片 -->
        </header>
        <div class="body">
            <div class="table">
                <div class="tableheader">
                    <div style="width:65%;height:100%;display:flex">
                        <div class="imgtable"></div>
                            <div class="writtentable">
                            <div style="height:70%"></div>
                            <div class="writtenfooter">
                                <div class="writimg">

                                </div>
                                <div class="writenglish">

                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="wingtable">
                        <!-- <div style="height:10%;width:100%"></div> -->
                        <div class="wingimg"></div>
                    </div>
                </div>

                <!-- 表格部分 -->
                <div class="tablebody">
                    <div class="bodyoption">
                        <div :class="colorBack == 2 ? 'focusclick ripple': 'focusnews ripple'" @click="changeBack(2)">
                            <div class="newsimg">
                                <div class="imgsfoc"></div>
                                <div class="contenfoc">要闻纵横</div>
                            </div>
                        </div>


                        <div :class="colorBack == 1 ? 'focusclick ripple': 'focusnews ripple'" @click="changeBack(1)">
                            <div class="newsimg">
                                <div class="imgsjourn"></div>
                                <div class="contenjourn">动态新闻</div>
                            </div>
                        </div>

                        <div :class="colorBack == 3 ? 'focusclick ripple': 'focusnews ripple'" @click="changeBack(3)">
                            <div class="newsimg">
                                <div class="imgssing"></div>
                                <div class="contenjourn">媒体聚焦</div>
                            </div>
                        </div>


                        <!-- <div class="btn ripple">
                            <div class="newsimg">
                                <div class="imgsjourn"></div>
                                <div class="contenjourn">动态新闻</div>
                            </div>
                        </div> -->

                    </div>
                    <div class="ptioncontent">
                        <tabledata v-if="colorBack==1"></tabledata>
                        <important v-if="colorBack==2"></important>
                        <focalength v-if="colorBack==3"></focalength>
                    </div>
                </div>
            </div>

            <div class="selectinput">
                <el-input v-model="inputconten" placeholder="请输入内容"
                size="mini" style="width:90%" @keyup.enter.native="handleCurrent()">
                
                
                    <i slot="prefix" class="el-input__icon el-icon-search"><!-- <span style="margin-left:5px">|</span> --></i>
                </el-input>
                
            </div>
        </div>
        <!-- <footer class="footer">
            <footerPage></footerPage>
        </footer> -->
    </div>
</template>

<script> 
import tabledata from './components/tableData.vue' // 动态新闻

import important from './components/Important.vue' // 要闻纵横 

import focalength from './components/focalength.vue' // 媒体焦距

export default {
    components:{
        tabledata,
        /* footerPage, */
        important,
        focalength
    },
    data(){
        return{
            inputconten:'', //搜索
            colorBack:1
        }
    },
    methods:{
        handleCurrent(){
            console.log('触发')
        },
        changeBack(val){
            this.colorBack = val
        }
    }
}
</script>

<style scoped>
    .maxbody{
        height: 100%;
        width: 100%;
        /* background: red; */
    }
    .btn {
        position: relative;
        margin: 0 auto;
        width: 200px;
        height: 50px;
        line-height: 50px;
        border-radius: 4px;
        box-shadow: 0 0 10px gray;
        background-color: #fff;
        overflow: hidden;
        cursor: pointer;
    }

    .ripple {
        position: relative;
        overflow: hidden;
    }

    .ripple:after {
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        background-image: radial-gradient(circle, rgb(226, 222, 222) 10%, transparent 20%);
        background-repeat: no-repeat;
        background-position: 50%;
        transform: scale(10, 10);
        opacity: 0;
        transition: transform 1.5s, opacity 1.5s;
    }

    .ripple:active:after {
        transform: scale(0, 0);
        opacity: .3;
        transition: 0s;
    }
    .backimg{
        height: 27%;
        width: 100%;
        background: #2b79c7;
        /* border: 1px solid #000; */
    }
    .selectinput{
        width: 10%;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        float: right;
    }

    .body{
        height: 73%;
        width: 100%;
        background: #fff;
        position: relative;
        /* border: 1px solid rgb(165, 43, 43); */
    }
    .table{
        width: 80%;
        height: 100%;
        position: absolute;
        left: 200px;
        transform: translate(-50%);
        left: 50%;
        top: -18%;
    }
    .tableheader{
        height: 25%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #EDF2F7;
    }
    .tablebody{
        margin-top: 2%;
        height: 78%;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    .imgtable{
        height: 95%;
        width: 12%;
        background: url("~./img/Journalism.png") no-repeat;
        background-size: 100% 100%;
    }
    .writtentable{
        height: 95%;
        width: 25%;
        /* background: url("~./img/Journalism.png") no-repeat;
        background-size: 100% 100%; */
    }
    .writtenfooter{
        width: 100%;
        height: 30%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* background: red; */
    }
    .writimg{
        width: 40%;
        height: 75%;
        background: url("~./img/written.png") no-repeat;
        background-size: 100% 100%;
    }
    .writenglish{
        margin-top: 15px;
        width: 55%;
        height: 40%;
        background: url("~./img/news.png") no-repeat;
        background-size: 100% 100%;
    }
    .wingtable{
        width: 50%;
        height: 100%;
    }
    .wingimg{
        width: 100%;
        height: 100%;
        background: url("~./img/wing.png") no-repeat;
        background-size: 100% 100%;
    }
    .bodyoption{
        width: 170px;
        height: 100%;
    }
    .ptioncontent{
        width: calc(100% - 195px);
        margin-left: 25px;
    }
    .focusnews{
        width: 100%;
        height: 24%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        color: #2A4B97;
        background: #EDF2F7;
    }
    .focusclick{
        width: 100%;
        height: 24%;
        display: flex;
        background: #2A4B97;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        color: #fff;
    }
    .newsimg{
        width: 75%;
        height: 35%;
        display: flex;
        align-items: center;
        justify-content: center;
        
    }
    .imgsfoc{
        width: 18%;
        height: 100%;
        background: url("~./img/fount.png") no-repeat;
        background-size: 100% 100%;
    }
    .imgsjourn{
        width: 18%;
        height: 100%;
        background: url("~./img/journ.png") no-repeat;
        background-size: 100% 100%;
    }
    .imgssing{
        width: 18%;
        height: 100%;
        background: url("~./img/sing.png") no-repeat;
        background-size: 100% 100%;
    }
    .contenfoc{
        margin-left: 10px;
        width: 50%;
        height: 60%;
        font-weight: bold;
        font-size: 14px;
        display: flex;
        align-items: center;
        font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
        /* background: url("~./img/focusnews.png") no-repeat;
        background-size: 100% 100%; */
    }
    .contenjourn{
        user-select: none;
        margin-left: 10px;
        width: 50%;
        height: 60%;
        font-weight: bold;
        font-size: 14px;
        display: flex;
        align-items: center;
        font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
        /* background: url("~./img/contenjourn.png") no-repeat;
        background-size: 100% 100%; */
    }


    >>> .el-input__inner {
        border: 1px solid #498AC4;
        display: flex;
        align-items: center;
        border-radius: 10px;
    }
</style>